package com.git.smp.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.git.smp.cache.DataDictionaryCache;
import com.git.smp.cache.EsbEnvironmentCache;
import com.git.smp.cache.SmpSystemCache;
import com.git.smp.cache.SmpUserCache;

@RestController
public class CacheController {
	
	
	@Autowired
	DataDictionaryCache dataDictionaryCache;
	
	@Autowired
	SmpSystemCache systemCache;
	

	@Autowired
	SmpUserCache userCache;
	
	@Autowired
	EsbEnvironmentCache esbEnvironmentCache;
	
	
	
	@RequestMapping("/refresh")
	public String refresh(){
		dataDictionaryCache.init();
		systemCache.init();
		userCache.init();
		esbEnvironmentCache.init();
		
		
		return "缓存刷新成功";
	}

}
